<?php
header("Content-type: text/html; charset=utf-8");
$cookieFile = dirname(__FILE__).'/'.'cookie.tmp';
//$data="";
 $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,'http://121.33.188.45:8098/login.asp'); //åœ°å€
    //curl_setopt($ch, CURLOPT_POST, 1);
    //curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
    //curl_setopt($ch, CURLOPT_HTTPHEADER,$data);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_COOKIEJAR, $cookieFile);
    
    //curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
    $res=curl_exec($ch);
    curl_close($ch);
    //$pat="/<img src='images\/(.*)\/.gif' border=0>/";
    $pat='/<img.+src=\"?(.+\.gif)\"?.+>/';
        preg_match($pat, $res,$m);
    //print_r($m[0]);
?>
<!DOCTYPE html>
<html>
  <head>
    <title>计算机二级查询</title>
    <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">



<link rel="stylesheet" href="css/weui.min.css">
<link rel="stylesheet" href="css/jquery-weui.css">
<link rel="stylesheet" href="css/demos.css">
<style>
#userimg img{border-radius:55px} 
</style>
<script type="text/javascript">
    // 对浏览器的UserAgent进行正则匹配，不含有微信独有标识的则为其他浏览器
    var useragent = navigator.userAgent;
    if (useragent.match(/MicroMessenger/i) != 'MicroMessenger') {
        // 这里警告框会阻塞当前页面继续加载
        alert('已禁止本次访问：您必须在微信内访问本页面！');
        // 以下代码是用javascript强行关闭当前页面
        var opened = window.open('about:blank', '_self');
        opened.opener = null;
        opened.close();
    }
</script>

  </head>

  <body ontouchstart>


    <header class='demos-header'>
      <h1 class="demos-title">计算机二级查询</h1>
    </header>
    
  <div id="userimg" align="center">                                    
        <img src="images/a.jpg" width="100px" height="100px" >
     </div>
<br/>
   
    

    <form action="index.php" method="get">
    <div class="weui-cells weui-cells_form">
      <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">身份证号</label></div>
        <div class="weui-cell__bd">
          <input class="weui-input" type="text" placeholder="身份证号" required="required" name="sfzh"/>
        </div>

      </div>
      
      <div class="weui-cell">
        <div class="weui-cell__hd"><label class="weui-label">验证码</label></div>
        <div class="weui-cell__bd">
          <input class="weui-input" type="text" placeholder="验证码" required="required" name="code" style="width:50%" />
          <span style="float:right"><?php echo $m[0];?></span>
        </div>
        
      </div>


      
     
    </div>
    
    <div class="weui-btn-area">
      
      <input class="weui-btn weui-btn_primary" type="submit" text="提交"></button>
    </div>
    </form>





    

   
   

   
    

   
    
    

    



    <script src="js/jquery-2.1.4.js"></script>
<script src="js/fastclick.js"></script>
<script>
  $(function() {
    FastClick.attach(document.body);
  });
</script>

<script src="js/jquery-weui.js"></script>

  </body>
</html>
